<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>基础服务设置</title>
<link rel="stylesheet" type="text/css" href="../../css/reset.css" />
<link rel="stylesheet" type="text/css" href="../../css/css.css" />
<link rel="stylesheet" type="text/css"
	href="../../js/jquery-easyui-1.4.3/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css"
	href="../../js/jquery-easyui-1.4.3/themes/icon.css" />
<link rel="stylesheet" type="text/css"
	href="../../js/SimpleTree1.3/js/tree_themes/SimpleTree.css" />
<link rel="stylesheet" type="text/css" href="../../css/colorReset.css" />
<style>
html, body {
	width: 100%;
	height: 100%;
	font-size: 16px;
}

.textbox {
	-webkit-border-radius: 0;
	border-radius: 0;
}

.combo {
	border-color: #d3d7da;
}

.title {
	width: 80%;
	margin: 0 auto;
	padding: 10px 0 10px 0;
	font-size: 25px;
	text-align: center;
}

.title h2 img {
	width: 176px;
}

.main {
	position: relative;
	width: 410px;
	height: 280px;
	margin: 20px auto 0;
	border: none;
	padding: 0;
	border-radius: 4px;
	background: #fff;
}

.regist_con_tit {
	width: 100%;
	height: 40px;
	line-height: 40px;
	text-align: center;
	vertical-align: middle;
	/*background: #30badf;*/
	background: url(../../images/tree_header.png) left top repeat-x;
	color: #fff;
	border-radius: 5px 5px 0 0;
}

.regist_con {
	width: 410px;
	margin: 0 auto;
}

.regist_con h3 {
	text-align: center;
	font-size: 14px;
	font-weight: bold;
	background: rgb(210, 224, 242);
	padding: 5px;
}

.regist_con ul {
	margin: 10px auto;
	width: 100%;
	overflow: hidden;
}

.regist_con ul li {
	display: block;
	float: left;
	height: 25px;
	overflow: hidden;
	padding: 5px 0;
}

.regist_con ul li.li_col {
	width: 100%;
	height: auto;
}

.regist_con .text {
	width: 270px;
	border: 1px solid #d3d7da;
	padding: 2px 3px;
	border-radius: 0;
	height: 20px;
	line-height: 20px;
	vertical-align: middle;
}

.regist_con .label {
	width: 112px;
	text-align: right;
	display: block;
	float: left;
	line-height: 25px;
}

.regist_con .input_con {
	float: left;
	margin-left: 10px;
}

.regist_con .input_con .input_con_li {
	padding: 5px 0;
}

.btn-con {
	margin-top: 20px;
	text-align: center;
}

.btn-con>button {
	margin: 0 auto;
}
</style>
</head>

<body>
	<!-- <div style="margin: 20px 0 10px 0;"></div> -->
	<div class="easyui-tabs" style="width: 100%; height: 550px;">
		<div title="服务邮箱设置" style="padding: 10px">
			<div class="title">
				<h2>
					<img src="../../images/logo.png" alt="" />
				</h2>
			</div>
			<div class="main">
				<div class="border_con top-border">
					<div class="corner_con left-top-corner"></div>
					<div class="corner_con right-top-corner"></div>
				</div>
				<div class="border_con left-border"></div>
				<div class="main-con">
					<div class="regist_con_tit">邮件服务设置</div>
					<div class="regist_con">
						<form id="SaveOrUpdateForm">
							<ul>
								<li class="li_col"><label for="fieldName" class="label">SMTP地址</label>
									<div class="input_con">
										<input type="text" name="txtSMTPAddress" id="txtSMTPAddress"
											class="easyui-validatebox text"
											data-options="required:true,validType:'smtp'"
											missingMessage="SMTP地址不能为空！" invalidMessage="SMTP地址格式不正确！" />
									</div></li>
								<li class="li_col"><label for="name" class="label">端口</label>
									<div class="input_con">
										<input type="text" name="txtPort" id="txtPort"
											class="easyui-validatebox text"
											data-options="required:true,validType:['port','length[0,6]']"
											missingMessage="端口必须为1~6位数的整数！"
											invalidMessage="端口必须为1~6位数的整数！" />
									</div></li>
								<li class="li_col"><label for="remark" class="label">邮件发送方地址</label>
									<div class="input_con">
										<input type="text" name="txtEmailSenderAddress"
											id="txtEmailSenderAddress" class="easyui-validatebox text"
											data-options="required:true,validType:'email'"
											missingMessage="请输入有效的电子邮件地址，如example@szlanyou.com"
											invalidMessage="请输入有效的电子邮件地址，如example@szlanyou.com" />

									</div></li>
								<li class="li_col"><label for="name" class="label">账号</label>
									<div class="input_con">
										<input id="txtAcount" name="txtAcount" type="text"
											class="easyui-validatebox text"
											data-options="required:true,validType:'account'"
											missingMessage="账号不能为空！"
											invalidMessage="账号不合法（字母开头，允许6-16字节，允许字母数字下划线）" />
									</div></li>

								<li class="li_col"><label for="name" class="label">密码</label>
									<div class="input_con">
										<input id="txtPassword" name="txtPassword" type="password"
											class="easyui-validatebox text"
											data-options="required:true,validType:'maxLength[200]'"
											missingMessage="密码不能为空！" />
									</div></li>
								<li class="li_col btn-con">
									<button class="default_btn" id="save-btn">保存修改</button>
								</li>
							</ul>
						</form>
					</div>
				</div>
				<div class="border_con right-border"></div>
				<div class="border_con bottom-border">
					<div class="corner_con left-bottom-corner"></div>
					<div class="corner_con right-bottom-corner"></div>
				</div>
			</div>
		</div>
		<div title="短信网关设置" style="padding: 10px">
			<div class="title">
				<h2>
					<img src="../../images/logo.png" alt="" />
				</h2>
			</div>
			<div class="main">
				<div class="border_con top-border">
					<div class="corner_con left-top-corner"></div>
					<div class="corner_con right-top-corner"></div>
				</div>
				<div class="border_con left-border"></div>
				<div class="main-con">
					<div class="regist_con_tit">短信网关设置</div>
					<div class="regist_con">
						<form id="SaveOrUpdateForm2">
							<ul>
								<li class="li_col"><label for="fieldName" class="label">IP地址</label>
									<div class="input_con">
										<input type="text" name="txtSMTPAddress" id="txtSmsAddress"
											class="easyui-validatebox text"
											data-options="required:true,validType:'ip'"
											missingMessage="IP地址不能为空！" invalidMessage="IP地址格式不正确！" />
									</div></li>
								<li class="li_col"><label for="name" class="label">端口</label>
									<div class="input_con">
										<input type="text" name="txtSmsPort" id="txtSmsPort"
											class="easyui-validatebox text"
											data-options="required:true,validType:['port','length[0,6]']"
											missingMessage="端口必须为1~6位数的整数！"
											invalidMessage="端口必须为1~6位数的整数！" />
									</div></li>
								<li class="li_col"><label for="name" class="label">账号</label>
									<div class="input_con">
										<input id="txtSmsAcount" name="txtSmsAcount" type="text"
											class="easyui-validatebox text"
											data-options="required:true,validType:'account'"
											missingMessage="账号不能为空！"
											invalidMessage="账号不合法（字母开头，允许6-16字节，允许字母数字下划线）" />
									</div></li>

								<li class="li_col"><label for="name" class="label">密码</label>
									<div class="input_con">
										<input id="txtSmsPassword" name="txtSmsPassword"
											type="password" class="easyui-validatebox text"
											data-options="required:true,validType:'maxLength[200]'"
											missingMessage="密码不能为空！" />
									</div></li>
								<li class="li_col btn-con">
									<button class="default_btn" id="save-btn2">保存修改</button>
								</li>
							</ul>
						</form>
					</div>
				</div>
				<div class="border_con right-border"></div>
				<div class="border_con bottom-border">
					<div class="corner_con left-bottom-corner"></div>
					<div class="corner_con right-bottom-corner"></div>
				</div>
			</div>
		</div>

		<div title="作业日志设置" style="padding: 10px">
			<div class="title">
				<h2>
					<img src="../../images/logo.png" alt="" />
				</h2>
			</div>
			<div class="main">
				<div class="border_con top-border">
					<div class="corner_con left-top-corner"></div>
					<div class="corner_con right-top-corner"></div>
				</div>
				<div class="border_con left-border"></div>
				<div class="main-con">
					<div class="regist_con_tit">作业日志设置</div>
					<div class="regist_con">
						<div id="SaveOrUpdateForm">
							<ul>
								<li class="li_col">
									<div style="text-align: center">
										<input id="ifChange" type="checkbox" /> <label>是否保存输入输出量为0并且执行成功的日志</label>
									</div>
								</li>
								<li class="li_col"><label class="label" id="ifChange"></label>
								</li>
								<li class="li_col btn-con" style="text-align: center">
									<!-- <input style="margin: 0 auto;" type="button" class="default_btn" onclick="changeResult()" value="保存" /> -->
									<button class="default_btn" id="save-btn3"
										onclick="changeResult()">保存修改</button>
								</li>
							</ul>
						</div>
					</div>
				</div>
				<div class="border_con right-border"></div>
				<div class="border_con bottom-border">
					<div class="corner_con left-bottom-corner"></div>
					<div class="corner_con right-bottom-corner"></div>
				</div>
			</div>

		</div>
		<div title="异常错误码设置" style="padding: 10px">
			<!-- 检索区域开始 -->
			<div class="sel_div">
				<table cellpadding="0" cellspacing="0" class="sel_con">
					<tr>
						<th colspan="5">数据检索</th>
					</tr>
					<tr>
						<td><label>异常错误码：</label> <input id="searchCode"
							name="errorCode" class="text" /></td>

						<td><label style="width: 90px;">异常错误描述：</label> <input
							class="text" type="text" name="name" id="searchDesc" /></td>
						<td>&nbsp;</td>
						<!--  <td>&nbsp;
        
        </td> -->
						<td>
							<button class="query_btn easyui-linkbutton" iconCls="icon-search"
								onclick="onSearch()" style="outline: none;">查询</button>
						</td>

						<td>
							<button class="query_btn easyui-linkbutton" iconCls="icon-reset"
								onclick="onReset()" style="outline: none;">重置</button>
						</td>
					</tr>
				</table>
			</div>


			<!-- 检索区域结束 -->
			<div class="data_con">
				<div id="toolbox" style="padding: 5px; height: 25px">
					<div style="margin-bottom: 5px; float: left">
						<a href="javascript:void(0)" onclick="add()"
							class="easyui-linkbutton" id="toolbar_add" iconCls="icon-add"
							plain="true">新增</a> <a href="javascript:void(0)"
							onclick="update()" class="easyui-linkbutton" id="toolbar_modify"
							iconCls="icon-edit" plain="true">修改</a> <a
							href="javascript:void(0)" onclick="del()"
							class="easyui-linkbutton" id="toolbar_delete"
							iconCls="icon-remove" plain="true">刪除</a>
					</div>
				</div>
				<table id="datagrid" style="height: 345px"
					data-options="fitColumns:true,toolbar:'#toolbox'">
				</table>
			</div>



			<div id="win" class="easyui-window" title="异常错误码-新增"
				style="width: 468px; height: auto;"
				data-options="iconCls:'icon-save',modal:true,minimizable:false,maximizable:false,collapsible:false">
				<form id="addForm" method="post">
					<div class="popup_con" style="width: 420px;">

						<ul style="width: 388px;">
							<li class="li_col"><label for="txtErrorCode" class="label"
								style="width: 96px;">异常错误码：</label>
								<div class="input_con">
									<input id="txtErrorCode" name="txtErrorCode"
										class="easyui-validatebox text"
										data-options="required:true,validType:['unnormal','length[0,50]']"
										missingMessage="异常错误码不能为空!" />
								</div></li>
							<li class="li_col"><label for="txtErrorCodeDesc"
								class="label" style="width: 96px; text-align: left;">异常错误码描述：</label>
								<div class="input_con">
									<textarea id="txtErrorCodeDesc" class="easyui-validatebox"
										name="txtErrorCodeDesc" rows="4"
										style="width: 260px; padding: 3px;"
										data-options="validType:'maxLength[100]'"></textarea>
								</div></li>
						</ul>
					</div>

				</form>
				<div id="buttons" class="button_con">
					<a href="javascript:void(0)" onclick="save()"
						class="easyui-linkbutton" id="instance_save" iconCls="icon-ok"
						plain="true">保存</a> <a href="javascript:void(0)"
						onclick="rePage()" class="easyui-linkbutton" id="cancalBtn"
						iconCls="icon-cancel" plain="true">取消</a>
				</div>

			</div>


		</div>

		<script type="text/javascript" src="/webjars/json3/3.3.2/json3.min.js"></script>
		<script type="text/javascript"
			src="../../js/jquery-easyui-1.4.3/jquery.min.js"></script>
		<script type="text/javascript"
			src="../../js/jquery-easyui-1.4.3/jquery.easyui.min.js"></script>
		<script type="text/javascript"
			src="../../js/jquery-easyui-1.4.3/locale/easyui-lang-zh_CN.js"></script>
		<script type="text/javascript" src="../../js/cook/constants.js"></script>
		<script type="text/javascript" src="../../js/cook/FormValidate.js"></script>
		<script type="text/javascript"
			src="../../js/cook/Infrastructure/EmailServiceSetting.js"></script>
		<script type="text/javascript"
			src="../../js/esb/ParamManage/ExceptionErrorCodeSetting.js"></script>
		<script>
	
	 $(document).ready(function(){
			$.ajax({
				url:BASE_URL_HISTORY_INTERFACE+ '/getchange/forLog' +'?v=' + Math.random(),
				dataType:'json',
				type:'get',
				contentType:"application/json",
				success:function(data){
					if(data.logField == false){
						$("#ifChange")[0].checked=true;
					}else{
						$("#ifChange")[0].checked=false;
					}
				}
			});
			
		});


		function changeResult(){
			var check = $("#ifChange")[0].checked;
			var changeInfo;
			if(check==true){
				changeInfo = "保存";
			}else{
				changeInfo = "不保存";
			}
			var param={changeInfo:changeInfo};
			$.ajax({
				url:BASE_URL_HISTORY_INTERFACE+ '/change/forLog' +'?v=' + Math.random(),
				dataType:'json',
				type:'get',
				data:param,
				contentType:"application/json",
				success:function(data){
					if(data.logField==false){
						$("#ifChange")[0].checked=true;
					}else{
						$("#ifChange")[0].checked=false;
					}
					$.messager.alert("提示","<p>设置成功！</p>","info");	
				},
				error:function(xhr,s,err){
					$.messager.alert("错误","<p>服务异常</p>","error");	
				}
			});
		} 
		function onReset(){
			$("#searchCode").val("");
			$("#searchDesc").val(""); 
		}
	</script>
</body>
</html>
